package com.example.king.ffmpegexample;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.widget.TextView;

public class MainActivity extends Activity {

    private NativeUtil nativeUtil;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        nativeUtil = new NativeUtil();


        // Example of a call to a native method
        TextView tv = (TextView) findViewById(R.id.sample_text);
        tv.setText(nativeUtil.stringFromJNI());

        nativeUtil.decodeMedia2Yuv("/mnt/sdcard/DCIM/Camera/VID_20180120_123024.mp4",
                Environment.getExternalStorageDirectory().getAbsolutePath() + "/test.yuv",
                Environment.getExternalStorageDirectory().getAbsolutePath() + "/test_audio.pcm");
    }


}
